GAME.Name = "Unnamed"
GAME.Author = "Unknown"
GAME.Version = "unversioned"

GAME.MouseDisabled = false

function GAME:Initialize () end --called when the game is selected

function GAME:Think () end --called before the game is rendered whilst unpaused
function GAME:AlwaysThink () end --always called when the toolgun screen is rendered

function GAME:Render () end --called when the game is to be rendered on screen; preferably render based on decimals of tgm.ScreenSize with normal surface functions

function GAME:Pause () end --called immediately when the player goes out of minigame mode (puts down the toolgun for normal use)
function GAME:Unpause () end --called when the toolgun is backi gaming position after being paused

GAME.Bind = {}
function GAME:BindPressed (bind) --player presses something like IN_ATTACK1
	self.Bind [bind] = true
end

function GAME:BindReleased (bind) --player releases something like IN_ATTACK1
	self.Bind [bind] = false
end

function GAME:BindDown (bind) --helper function if ou don't change the above functions
	if !self.Bind [bind] then return false end
	return self.Bind [bind]
end

function GAME:KeyDown( key ) --get whether the player has a key down from the player's metatable (more stable?)
	local ply = LocalPlayer()
	if !ValidEntity (ply) then return false end
	return ply:KeyDown (key)
end

function GAME:KeyPressed( key ) --whether key pressed from the metatable (better to use BindPressed usually).
	local ply = LocalPlayer()
	if !ValidEntity (ply) then return false end
	return ply:KeyPressed (key)
end

function GAME:MouseX () --position of the mouse along x axis
	return self.parent.mouse.x
end

function GAME:MouseY () --position of the mouse along y axis
	return self.parent.mouse.y
end

function GAME:MousePos () --both positions: use like 'local x,y = self:MousePos()'
	return self.parent.mouse.x, self.parent.mouse.y
end

function GAME:MouseEnabled ()
	return not self.MouseDisabled
end

function GAME:EnableMouse ()
	self.MouseDisabled = false
end

function GAME:DisableMouse ()
	self.MouseDisabled = true
end
